/***
 * R-ZBZB-202109280789713：添加下载图标，增加下载列表页面
 */
import request from "@/utils/request";
export const service = () => {
  return !!JSON.parse(localStorage.$loginInfo).tenantId ? "/event" : "/ttevent";
};
export const device = () => {
  return !!JSON.parse(localStorage.$loginInfo).tenantId
    ? "/device"
    : "/ttdevice";
};
// 查询租户信息
export function queryFlowLink(query) {
  return request({
    url: service() + "/flow/alarm/queryFlowLink",
    method: "post",
    data: query,
  });
}
//queryNextLink
export function queryNextLink(query) {
  return request({
    url: service() + "/flow/alarm/queryNextLink",
    method: "post",
    data: query,
  });
}
//queryNextLink
export function getInterceptInfo(params) {
  return request({
    url: service() + "/alarm/intercept/getInterceptInfo",
    method: "post",
    data: params,
  });
}
//queryNextLink
export function updateIntercept(query) {
  return request({
    url: service() + "/alarm/intercept/updateIntercept",
    method: "post",
    data: query,
  });
}
//queryNextLink
export function getRegion(query) {
  return request({
    url: "/admin/video/getRegion",
    method: "post",
    data: query,
  });
}
//queryNextLink
export function getInterceptList(query) {
  return request({
    url: service() + "/alarm/intercept/getInterceptList",
    method: "post",
    data: query,
  });
}
//queryNextLink
export function getDeviceList(query) {
  return request({
    url: device() + "/video/device/getDeviceList",
    method: "post",
    data: query,
  });
}
//queryNextLink
export function findOrderAlarm(query) {
  return request({
    url: service() + "/alarm/type/findOrderAlarm",
    method: "post",
    data: query,
  });
}
//queryNextLink
export function queryTenantInfo(query) {
  return request({
    // url: '/admin/system/tenant/queryTenantInfo',
    url: "/admin/custom/manage/queryTenantInfo",
    method: "post",
    data: query,
  });
}
//queryNextLink
export function getEnumInfo(query) {
  return request({
    url: "/admin/base/system/dict/data/dictType/" + query.enumTypeId,
    method: "get",
  });
}

export function restoreWarningOrder(query) {
  return request({
    url: service() + "/alarm/intercept/restoreWarningOrder",
    method: "post",
    data: query,
  });
}

// 告警原因列表
export function queryAlarmReasonList(query) {
  return request({
    url: service() + "/alarm/reason/queryAlarmReasonList",
    method: "post",
    data: query,
  });
}
